<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改班级')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-klass-edit" th:object="${eduKlass}">
            <input name="klassId" th:field="*{klassId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">班级名称：</label>
                <div class="col-sm-8">
                    <input name="klassName" th:field="*{klassName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">班主任：</label>
                <div class="col-sm-8">
                    <select id="teacher" th:field="*{teacherId}" class="form-control select2-multiple">
                        <option th:each="teacher:${teachers}" th:value="${teacher.teacherId}" th:text="${teacher.teacherName}" th:selected="${teacher.teacherId==teacherId}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/klass";
        $("#form-klass-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-klass-edit').serialize());
            }
        }
    </script>
</body>
</html>